﻿<UserControl x:Class="FlickrSample.View.Common.BackBarView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    d:DesignHeight="300" d:DesignWidth="400">
    
    <Grid x:Name="LayoutRoot">
        <TextBlock VerticalAlignment="Top" Foreground="White" Style="{StaticResource TitleTextBlock}" TextTrimming="WordEllipsis" TextAlignment="Right" Text="{Binding Title}" Margin="104,-14,12,0"/>
        <Button Content="{Binding ParentModel}" Visibility="{Binding ParentModel.BackVisible}" Command="{Binding NavigateBackCommand}" HorizontalAlignment="Left" VerticalAlignment="Top" Width="90" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" Height="36" Style="{StaticResource NiceButton}" Margin="7,10,0,0">
            <Button.Background>
                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                    <GradientStop Color="#FF5E5E5E" Offset="0"/>
                    <GradientStop Color="Black" Offset="0.991"/>
                    <GradientStop Color="#FF393939" Offset="0.504"/>
                    <GradientStop Color="#FE2F2F2F" Offset="0.509"/>
                </LinearGradientBrush>
            </Button.Background>
            <Button.ContentTemplate>
                <DataTemplate>
                    <Grid>
                        <StackPanel Orientation="Horizontal" d:LayoutOverrides="Height">
                            <TextBlock TextWrapping="NoWrap" TextTrimming="WordEllipsis" TextAlignment="Center" FontFamily="Segoe UI Light" FontSize="16" Foreground="White" Height="30" Text="&lt;"/>
                            <TextBlock Text="{Binding NavigationService.PreviousContentObject.Title}" TextWrapping="NoWrap" TextTrimming="WordEllipsis" TextAlignment="Center" FontFamily="Segoe UI Light" FontSize="16" Foreground="White" Margin="3,0,0,5" Width="68" VerticalAlignment="Center"/>
                        </StackPanel>
                    </Grid>
                </DataTemplate>
            </Button.ContentTemplate>
        </Button>
    </Grid>
</UserControl>
